<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
    
<!-- Hidden Form View -->
		
		<record id="product_category_form_view_inherit_applico" model="ir.ui.view">
            <field name="name">product.category.form.applico</field>
            <field name="model">product.category</field>
            <field name="inherit_id" ref="stock.product_category_form_view_inherit" />
            <field name="arch" type="xml">
	            <group string="Logistics" colspan="2" position="replace">
	                <group string="Logistics" groups="applico_v8.hidden_applico"/>
	            </group>
            </field>
        </record>

		<record id="product_template_form_view_applico" model="ir.ui.view">
			<field name="name">product.template.common.form.applico</field>
			<field name="model">product.template</field>
			<field name="inherit_id" ref="product.product_template_form_view"/>
			<field name="arch" type="xml">
				<group name="status" string="Status" position="replace">
					<group name="status" groups="applico_v8.hidden_applico">
						<field name="state"/>
                        <field name="product_manager"/>
					</group>
				</group>
				<field name="seller_ids" position="replace"/>
				<separator string="Suppliers" position="replace">
					<separator string="Suppliers" invisible="1"/>
					<field name="seller_ids" invisible="1"/>
				</separator>
			</field>
		</record>

		<record id="product_form_view_procurement_button_applico" model="ir.ui.view">
			<field name="name">product.product.procurement.applico</field>
			<field name="model">product.product</field>
			<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
			<field name="arch" type="xml">
				<button name='%(stock.product_open_quants)d' position="replace">
					<button class="oe_stat_button"
						name="%(stock.product_open_quants)d"
						icon="fa-building-o"
						type="action"  attrs="{'invisible':[('type', '=', 'service')]}" invisible="1" groups="stock.group_locations">
					<div><field name="qty_available_text"/></div>
					</button>
				</button>
				<button name='action_view_routes' position="replace">
					<button class="oe_inline oe_stat_button" name="action_view_routes" string="Routes" type="object" icon="fa-cogs" invisible="1"/>
				</button>
				<button name="%(stock.act_product_stock_move_open)d" position="replace">
					<button class="oe_inline oe_stat_button" string="Moves" name= "%(stock.act_product_stock_move_open)d" type="action" invisible="1" icon="fa-arrows-v"/>
				</button>
				<button name="%(stock.product_open_orderpoint)d" position="replace">
					<button class="oe_inline oe_stat_button" name="%(stock.product_open_orderpoint)d" type="action" invisible="1" icon="fa-refresh" string="Reordering Rules"/>
				</button>
			</field>
		</record>

		<record id="product_template_form_view_procurement_button_applico" model="ir.ui.view">
			<field name="name">product.template_procurement.applico</field>
			<field name="model">product.template</field>
			<field name="inherit_id" ref="stock.product_template_form_view_procurement_button"/>
			<field name="arch" type="xml">
				<button name='action_open_quants' position="replace">
					<button class="oe_stat_button"
						name="action_open_quants"
						icon="fa-building-o" invisible="1"
						type="object"  attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations">
					<div><field name="qty_available_text"/></div>
					</button>
				</button>
				<button name='action_view_routes' position="replace">
					<button class="oe_inline oe_stat_button" name="action_view_routes" string="Routes" type="object" icon="fa-cogs" invisible="1"/>
				</button>
				<button name="action_view_stock_moves" position="replace">
					 <button class="oe_inline oe_stat_button" string="Moves" name= "action_view_stock_moves" type="object" invisible="1" icon="fa-arrows-v"/>
				</button>
				<button name="action_view_orderpoints" position="replace">
					 <button class="oe_inline oe_stat_button" name="action_view_orderpoints" type="object" invisible="1" icon="fa-refresh" string="Reordering Rules"/>
				</button>
			</field>
		</record>

		<record id="view_template_property_form_applico" model="ir.ui.view">
			<field name="name">product.template.stock.property.form.inherit.applico</field>
			<field name="model">product.template</field>
			<field name="inherit_id" ref="stock_account.view_template_property_form"/>
			<field name="arch" type="xml">
				<button name="%(stock_account.action_view_change_standard_price)d" position="replace">
					<button name="%(stock_account.action_view_change_standard_price)d" string="- update" invisible="1" type="action" class="oe_link"/>
				</button>
			</field>
		</record>

		<record id="view_template_property_form_applico2" model="ir.ui.view">
			<field name="name">product.template.stock.property.form.inherit.applico2</field>
			<field name="model">product.template</field>
			<field name="inherit_id" ref="stock.view_template_property_form"/>
			<field name="arch" type="xml">
				<button name="%(stock.action_view_change_product_quantity)d" position="replace">
					<button name="%(stock.action_view_change_product_quantity)d" string="⇒ Update"
						type="action" class="oe_link" invisible="1"/>
				</button>
				<button name="%(stock.act_make_procurement)d" position="replace">
					<button string="⇒ Request Procurement" name="%(stock.act_make_procurement)d" type="action" class="oe_link" invisible="1"/>
				</button>
				<group string="Supply Chain Information" position="replace">
					<group string="Supply Chain Information" invisible="1">
						<field name="route_ids" widget="many2many_checkboxes"/>
					</group>
				</group>
				<field name="property_stock_procurement" groups="applico_v8.hidden_applico" position="replace">
		        	<field name="property_stock_procurement" groups="applico_v8.hidden_applico"/>
		        </field>
		        <field name="property_stock_production" groups="applico_v8.hidden_applico" position="replace">
		        	<field name="property_stock_production" groups="applico_v8.hidden_applico"/>
		        </field>
			</field>
		</record>

<!-- Hidden Search View -->

		<record id="product_template_search_view_applico" model="ir.ui.view">
			<field name="name">product.template.search.applico</field>
			<field name="model">product.template</field>
			<field name="inherit_id" ref="product.product_template_search_view"/>
			<field name="arch" type="xml">
				<filter name="consumable" position="replace">
					<filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products" invisible="1"/>
				</filter>
			</field>
		</record>

	</data>
</openerp>
